﻿using Apps.Models;
using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Apps.DAL.HC
{
    public partial class HC_FIELD_REFERENCE_VALUE_Repository : DbContext<HC_FIELD_REFERENCE_VALUE>
    {
        public List<HC_FIELD_REFERENCE_VALUE> GetList(string extendField)
        {
            return Db.Queryable<HC_FIELD_REFERENCE_VALUE>().Where(it => it.EXTENDFIELDID == extendField).ToList();
        }
        public List<REFERENCE_VALUE> GetReferenceValue(string extendField)
        {
            return Db.Queryable<HC_FIELD_REFERENCE_VALUE>().Where(it => it.EXTENDFIELDID == extendField).Select(x => new REFERENCE_VALUE
            {
                ID = x.ID,
                BASEVALUE = x.BASEVALUE,
                MINVALUE = x.MINVALUE,
                MAXVALUE = x.MAXVALUE,
            }).ToList();
        }
    }
}
